﻿using System;

namespace Xin478.CSWork.Common
{
    [Serializable]
    public class WorkFileInfo
    {
        public int Id { get; set; }
        public string FileName { get; set; }
        public string FileCode { get; set; }
        public DateTime? AddTime { get; set; }
        public int WorkId { get; set; }
        public string FileDir { get; set; }
        public string FileExt
        {
            get
            {
                if (string.IsNullOrEmpty(FileName)) return string.Empty;
                int i = FileName.LastIndexOf('.');
                return i == -1 ? string.Empty : FileName.Substring(i);
            }
        }
        public int UserId { get; set; }
    }
}
